package com.xhh.edu.web.controller;

import com.xhh.edu.model.User;
import com.xhh.edu.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("user")
public class UserController {
    @Autowired
    private IUserService userService;


    @RequestMapping("login")
    public String login() {
        System.out.println("......");
        return "Default";
    }

    @RequestMapping("find")
    public String find(Integer id) {
        System.out.println("......");
        User user = userService.findByID(id);
        System.out.println(user);
        return null;

    }
    @RequestMapping("userManage")
    public String userManage(){
        return "User/UserManage";
    }
    @RequestMapping("userInfo")
    public String userInfo(){
        return "User/UserInfo";
    }
    @RequestMapping("edit")
    public String edit(){
        return "User/UserEdit";
    }

}